﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace T.FAS.Runtime.Metadata.Entity.Page
{
    /// <summary>
    /// 表单本地变量
    /// </summary>
    [DataContract]
    [Serializable]
    public class PageVariable : ICloneable
    {
        /// <summary>
        /// 主键
        /// </summary>
        [DataMember]
        public string ID { get; set; }
        /// <summary>
        /// 变量类型
        /// </summary>
        public VariableType VariableType { get; set; }
        /// <summary>
        /// PageID
        /// </summary>
        public string PageID { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        [DataMember]
        public int VariableOrder { get; set; }
        /// <summary>
        /// 标识
        /// </summary>
        [DataMember]
        public string Code { get; set; }
        /// <summary>
        /// 变量名
        /// </summary>
        [DataMember]
        public string Name { get; set; }
        /// <summary>
        /// 显示内容
        /// </summary>
        [DataMember]
        public string DataType { get; set; }
        /// <summary>
        /// 显示内容
        /// </summary>
        [DataMember]
        public string DisplayTypeInfo { get; set; }
        /// <summary>
        /// 实体元数据ID
        /// </summary>
        [DataMember]
        public string EntityMetadataID { get; set; }
        /// <summary>
        /// 实体元数据类型
        /// </summary>
        [DataMember]
        public string EntityMetadataType { get; set; }
        /// <summary>
        /// 变量名
        /// </summary>
        [DataMember]
        public string EntityMetadataAlias { get; set; }
        /// <summary>
        /// 是否允许为空
        /// </summary>
        [DataMember]
        public bool IsAllowNull { get; set; }
        /// <summary>
        /// 默认值
        /// </summary>
        [DataMember]
        public string DefaultValue { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        [DataMember]
        public string ParamDescription { get; set; }
        /// <summary>
        /// 参数帮助描述
        /// </summary>
        [DataMember]
        public string DisplayHelpSetting { get; set; }
        /// <summary>
        /// 参数帮助设置
        /// </summary>
        [DataMember]
        public string HelpSetting { get; set; }
        /// <summary>
        /// 公共参数帮助设置
        /// </summary>
        [DataMember]
        public string PublicParamsSetting { get; set; }
        /// <summary>
        /// 输入类型
        /// </summary>
        [DataMember]
        public string VariableInputType { get; set; }
        /// <summary>
        /// 值类型
        /// </summary>
        public PropertyValueType DefaultValueType { get; set; }
        public object Clone()
        {
            return this.MemberwiseClone();
        }
    }
}
